-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add test to show that IPA fails for cap 1, 2, 3, and 4 #1346
add test to show that IPA fails for cap 1, 2, 3, and 4 #1346
Conversation
It is still gross that we use 3 bit trigger values for everything, but oh well...
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1346 +/- ##
==========================================
+ Coverage 93.44% 93.48% +0.04%
==========================================
Files 209 211 +2
Lines 34512 34959 +447
==========================================
+ Hits 32249 32683 +434
- Misses 2263 2276 +13 ☔ View full report in Codecov by Sentry. |
@@ -147,13 +147,15 @@ where | |||
#[cfg(not(feature = "relaxed-dp"))] | |||
let padding_params = PaddingParameters::default(); | |||
match config.per_user_credit_cap { | |||
1 => oprf_ipa::<_, BA8, BA3, HV, BA20, 1, 256>(ctx, input, aws, dp_params, padding_params).await, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using BA3 for trigger values with cap 1 is gross, but the input is assumed to be fixed size, so it is a much bigger change to make if we want it
8 => oprf_ipa::<_, BA8, BA3, HV, BA20, 3, 256>(ctx, input, aws, dp_params, padding_params).await, | ||
16 => oprf_ipa::<_, BA8, BA3, HV, BA20, 4, 256>(ctx, input, aws, dp_params, padding_params).await, | ||
32 => oprf_ipa::<_, BA8, BA3, HV, BA20, 5, 256>(ctx, input, aws, dp_params, padding_params).await, | ||
64 => oprf_ipa::<_, BA8, BA3, HV, BA20, 6, 256>(ctx, input, aws, dp_params, padding_params).await, | ||
128 => oprf_ipa::<_, BA8, BA3, HV, BA20, 7, 256>(ctx, input, aws, dp_params, padding_params).await, | ||
_ => panic!( | ||
"Invalid value specified for per-user cap: {:?}. Must be one of 8, 16, 32, 64, or 128.", | ||
"Invalid value specified for per-user cap: {:?}. Must be one of 1, 2, 4, 8, 16, 32, 64, or 128.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why we picked cap sizes to be a power of two, but I tried to stick with the same approach.
@eriktaubeneck, @shinta-liem would that be sufficient for in-market test to support cap of 1, 2 and 4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that's plenty sufficient
@akoshelev here is a few basic tests to show the that IPA doesn't work for per user credit cap of 1, 2, 3, or 4.